<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta charset="utf-8">
  <title>汽车安全装备详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <style type="text/css">
  	.layui-input{
  		width: 200px;
  	}
  	.layui-form-pane .layui-form-label{
  		width: 200px;
  	}
  </style>
</head>

 
<body>
<div>
	<div style="padding: 50px;padding-top: 10px">
		<form class="layui-form layui-form-pane"  action="">
			<input type="hidden" id='entityId' name='entityId' value="${carDetailControlConfig.id }">
			<input type="hidden" name='carmodelid' value="${carmodelid }">
			
	   		 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">ABS防抱死</label>
			     <div class="layui-input-inline">
			         <input type="text" name="abs" id='abs' placeholder="请输入ABS防抱死" value="${carDetailControlConfig.abs }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">制动力分配(EBD/CBC等)</label>
			     <div class="layui-input-inline">
			         <input type="text" name="brakingforcedistribution" id='brakingforcedistribution' placeholder="请输入制动力分配(EBD/CBC等)" value="${carDetailControlConfig.brakingforcedistribution }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">刹车辅助(EBA/BAS/BA等)</label>
			     <div class="layui-input-inline">
			         <input type="text" name="braleassist" id='braleassist' placeholder="请输入刹车辅助(EBA/BAS/BA等)" value="${carDetailControlConfig.braleassist }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">牵引力控制(ASR/TCS/TRC等)</label>
			     <div class="layui-input-inline">
			         <input type="text" name="tractioncontrol" id='tractioncontrol' placeholder="请输入牵引力控制(ASR/TCS/TRC等)" value="${carDetailControlConfig.tractioncontrol }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">车身稳定控制(ESC/ESP/DSC等)</label>
			     <div class="layui-input-inline">
			         <input type="text" name="stabilitycontrol" id='stabilitycontrol' placeholder="请输入车身稳定控制(ESC/ESP/DSC等)" value="${carDetailControlConfig.stabilitycontrol }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">上坡辅助</label>
			     <div class="layui-input-inline">
			         <input type="text" name="upslopeauxiliary" id='upslopeauxiliary' placeholder="请输入上坡辅助" value="${carDetailControlConfig.upslopeauxiliary }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">自动驻车</label>
			     <div class="layui-input-inline">
			         <input type="text" name="automaticparking" id='automaticparking' placeholder="请输入自动驻车" value="${carDetailControlConfig.automaticparking }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">陡坡缓降</label>
			     <div class="layui-input-inline">
			         <input type="text" name="steepslopeslowlydescending" id='steepslopeslowlydescending' placeholder="请输入陡坡缓降" value="${carDetailControlConfig.steepslopeslowlydescending }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">可变悬架</label>
			     <div class="layui-input-inline">
			         <input type="text" name="variablesuspension" id='variablesuspension' placeholder="请输入可变悬架" value="${carDetailControlConfig.variablesuspension }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">空气悬架</label>
			     <div class="layui-input-inline">
			         <input type="text" name="frontaxlelimitedslip" id='frontaxlelimitedslip' placeholder="请输入空气悬架" value="${carDetailControlConfig.frontaxlelimitedslip }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">可变转向比</label>
			     <div class="layui-input-inline">
			         <input type="text" name="centraldifferential" id='centraldifferential' placeholder="请输入可变转向比" value="${carDetailControlConfig.centraldifferential }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">前桥限滑差速器/差速锁</label>
			     <div class="layui-input-inline">
			         <input type="text" name="axlelimitedslip" id='axlelimitedslip' placeholder="请输入前桥限滑差速器/差速锁" value="${carDetailControlConfig.axlelimitedslip }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">中央差速器锁止功能</label>
			     <div class="layui-input-inline">
			         <input type="text" name="differentiallocking" id='differentiallocking' placeholder="请输入中央差速器锁止功能" value="${carDetailControlConfig.differentiallocking }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">后桥限滑差速器/差速锁</label>
			     <div class="layui-input-inline">
			         <input type="text" name="differetialmechanism" id='differetialmechanism' placeholder="请输入后桥限滑差速器/差速锁" value="${carDetailControlConfig.differetialmechanism }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
			    <div class="layui-input-block">
			      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
		    	</div>
		  	</div>
		</form>
	</div>
 </div>
<script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carDetailControlConfig/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
</body>
</html>
